<%@ page pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>






<isperp:incidentView readonly="false">

	<jsp:body> 

<c:if test="${model.areFeedback ne true }">
	<div
				style="border: 1px solid #FFB951 !important;padding: 5px 10px 5px 10px !important;margin:5px 10px">
		提示：该事件已于
		<fmt:formatDate value="${model.solvedDate }"
					pattern="yyyy-MM-dd HH:mm" />
		解决，客户尚未确认，请确认是否要关闭该事件！
	</div>

</c:if>


<jsp:include page="step1view.jsp"></jsp:include>
<jsp:include page="step2view.jsp"></jsp:include>
<jsp:include page="step3view.jsp"></jsp:include>



<div class="box no-border">



	<div class="header">
		<h3>关闭信息</h3>
	</div>
	<form:form id="incidentHandleForm" commandName="model"
				cssClass="validate" action="incident/incident/save">
		<form:hidden path="id" />
		<form:hidden path="closerId" />
		<table class="form-table">
			 

			<c:choose>

				<c:when test="${model.areFeedback eq true }">
					<tr>
						<td class="td1">申报人是否已评价：</td>
						<td class="td2"><form:checkbox path="areFeedback"
										disabled="true" />
								</td>
					</tr>
					<tr>
						<td class="td1">总体满意度：</td>
						<td class="td2"><form:radiobuttons path="satisfaction"
										disabled="true" items="${satisfications}" itemLabel="name"
										itemValue="code" />&nbsp;&nbsp;</td>
					</tr>
					 
					<tr>
						<td class="td1">客户意见：</td>
						<td class="td2"><form:textarea path="customerOpinion"
										disabled="true" />
								</td>
					</tr>
				</c:when>
				<c:otherwise>
					<tr style="display:none">
						<td class="td1">是否验证：</td>
						<td class="td2"><form:checkbox path="areFeedback" />
								</td>
					</tr>
					<tr>
						<td class="td1">关闭码：</td>
						<td class="td2"><form:select path="closeCode"
										items="${closeCodes}" itemLabel="name" itemValue="name"
										cssClass="required" />
								</td>
					</tr>
					<tr>
						<td class="td1">总体满意度：</td>
						<td class="td2"><form:radiobuttons path="satisfaction"
										items="${satisfications}" itemLabel="name" itemValue="code" />&nbsp;&nbsp;
						</td>
					</tr>
					 
					<tr>
						<td class="td1">客户意见：</td>
						<td class="td2"><form:textarea path="customerOpinion" />
								</td>
					</tr>
				</c:otherwise>
			</c:choose>




			<tr>
				<td class="td1">附件：</td>
				<td class="td2"><isperp:uploader sourceId="${model.id }"
								id="incidentFilesclose"></isperp:uploader>
						</td>
			</tr>
		</table>
	</form:form>

</div>

	</jsp:body>
</isperp:incidentView>


<isperp:buttonList>
	<isperp:processButtons processKey="incidentProcess" 	beforeSubmit="function(name){return checkTask(name);}"
		processId="${model.processId }" businessKey="${model.id }"
		formId="incidentHandleForm"></isperp:processButtons>
	<button
		onclick="isperp.openDialog({contentUrl:'ReportServer?reportlet=incident/cpt_incident_print_pd.cpt&op=write&incident_id=${model.id}'})">打印事件单</button>

</isperp:buttonList>


<script type="text/javascript">
<!--
	function checkTask(name) {

		var confirmtimecost = $("#confirmtimecost").val();
		if (confirmtimecost == 0 || confirmtimecost == "0") {
			isperp.errorAlert("请填写申报工时！");
			return false;
		}
		
		return true;
	}
//-->
</script>